/**
 * 本地存储的操作的再封装
 */
const obj = {
    get(key) {
      return JSON.parse(localStorage.getItem(key));
    },
    set(key, val) {
      localStorage.setItem(key, JSON.stringify(val));
    },
    remove(key) {
      localStorage.removeItem(key);
    },
    clear() {
      localStorage.clear();
    }
}

export default obj;